package com.vcg.community.common.utils;

import java.lang.reflect.Type;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class JsonUtil {
	
	public static String toJSONString(Object obj) {
		return JSON.toJSONString(obj,SerializerFeature.WriteDateUseDateFormat);
	}
	public static  <T> List<T> parseArray(String text, Class<T> clazz){
		return JSON.parseArray(text, clazz);
	}
	
	public static  <T> T parseObject(String text,Type clazz){
		return JSON.parseObject(text, clazz);
	}
	
}
